{
	"info": {
		"_postman_id": "3d72c99e-52f4-4db3-ac3a-6f9c97b51497",
		"name": "Протокол 1.3 Лекарственное обеспечение",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "48020210",
		"_collection_link": "https://nst-sid-6186244.postman.co/workspace/nst-sid's-Workspace~d2a1dc8f-cae0-4166-807b-dc131f8f29a6/collection/48020210-3d72c99e-52f4-4db3-ac3a-6f9c97b51497?action=share&source=collection_link&creator=48020210"
	},
	"item": [
		{
			"name": "1. Рецептурное назначение",
			"item": [
				{
					"name": "Предварительные условия",
					"item": [
						{
							"name": "Достать врача и организацию из токена врача и добавить в переменную",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"const jwt = pm.request.auth.oauth2.get(\"accessToken\");\r",
											"console.log(jwt);\r",
											"if (jwt) {\r",
											"    let payload = jwt.split('.')[1];\r",
											"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
											"    while (payload.length % 4) payload += '=';\r",
											"    let decoded = JSON.parse(atob(payload));\r",
											"    console.log(decoded)\r",
											"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
											"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
											"    if (practitionerId) pm.environment.set(\"PractitionerId\", practitionerId);\r",
											"    if (organizationId) pm.environment.set(\"OrganizationId\", organizationId);\r",
											"} else {\r",
											"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "0.3.4934",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "https://postman-echo.com/get",
									"protocol": "https",
									"host": [
										"postman-echo",
										"com"
									],
									"path": [
										"get"
									]
								}
							},
							"response": []
						},
						{
							"name": "Достать PractitionerRole врача (PractitionerRole)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
											"\r",
											"pm.environment.set(\"PractitionerRole\", practitionerRole);\r",
											"console.log(practitionerRole)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId}}",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"PractitionerRole"
									],
									"query": [
										{
											"key": "practitioner",
											"value": "{{PractitionerId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Достать структурное подразделение врача (LocationId)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"let json = pm.response.json();\r",
											"let locationValue = null;\r",
											"\r",
											"if (Array.isArray(json.entry)) {\r",
											"    for (let entry of json.entry) {\r",
											"        if (\r",
											"            entry.resource &&\r",
											"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
											"            Array.isArray(entry.resource.location) &&\r",
											"            entry.resource.location.length > 0\r",
											"        ) {\r",
											"            // Берём reference первого location и извлекаем только UUID\r",
											"            let ref = entry.resource.location[0].reference;\r",
											"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
											"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
											"            }\r",
											"            break;\r",
											"        }\r",
											"    }\r",
											"}\r",
											"\r",
											"if (locationValue) {\r",
											"    pm.environment.set(\"LocationId\", locationValue);\r",
											"    console.log(\"location сохранён:\", locationValue);\r",
											"} else {\r",
											"    console.log(\"location не найден\");\r",
											"}\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole}}",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"PractitionerRole"
									],
									"query": [
										{
											"key": "_id",
											"value": "{{PractitionerRole}}"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "1. Рецептурное назначение ЛС, созданного в амбулаторных условиях",
					"item": [
						{
							"name": "Поиск пациента по идентификатору (patientId)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
											"\r",
											"pm.environment.set(\"patientId\", patientId);\r",
											"console.log(patientId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551269A009PB0",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient"
									],
									"query": [
										{
											"key": "identifier",
											"value": "7551269A009PB0"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleEpisodeOfEmergencyCareWithID1\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"{{$isoTimestamp}}\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionBundleEpisode1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionBundleEpisode1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-03\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisEp3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"List/ExamplePrescriptions\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551269A009PB0\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1255212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Сlinical-functional\",\r\n                                    \"display\": \"Клинико-функциональный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-03\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"J20\",\r\n                            \"display\": \"J20 - Острый бронхит\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"J20 - Острый бронхит\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-03\",\r\n                \"recordedDate\": \"2025-12-03\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Острый бронхит\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/ExampleEncounterEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"ExampleEncounterEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfVisit\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfVisit\",\r\n                                    \"code\": \"primary\",\r\n                                    \"display\": \"первичное обращение\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1234/6\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\",\r\n                            \"display\": \"Плановая медицинская помощь\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"primary\",\r\n                                \"display\": \"Первичная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-12-03T11:30:00Z\",\r\n                    \"end\": \"2025-12-03T11:50:00Z\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisEp3\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\",\r\n                                        \"display\": \"Основной диагноз\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"location\": {\r\n                            \"reference\": \"Location/{{LocationId}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"List/ExamplePrescriptions\",\r\n            \"resource\": {\r\n                \"resourceType\": \"List\",\r\n                \"id\": \"ExamplePrescriptions{{$timestamp}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PrescriptionList\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"current\",\r\n                \"mode\": \"working\",\r\n                \"title\": \"Список выписанных препаратов\",\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/ExampleEncounterEp3\"\r\n                },\r\n                \"date\": \"{{$isoTimestamp}}\",\r\n                \"source\": {\r\n                    \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                },\r\n                \"entry\": [\r\n                    {\r\n                        \"item\": {\r\n                            \"identifier\": {\r\n                                \"system\": \"ehr.platform\",\r\n                                \"value\": \"4db2d18a-419d-4133-b77e-f679dc5a23f4\"\r\n                            }\r\n                        }\r\n                    },\r\n                    {\r\n                        \"item\": {\r\n                            \"identifier\": {\r\n                                \"system\": \"ehr.platform\",\r\n                                \"value\": \"c6ed6944-87d8-4147-8c2d-950fc254cd63\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия Выписанных рецептов",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationPrescriptionDP&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"MedicationRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationPrescriptionDP"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Получение сводной информации о пациенте",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-09&end=2025-11",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"$everything"
									],
									"query": [
										{
											"key": "start",
											"value": "2025-09"
										},
										{
											"key": "end",
											"value": "2025-11"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		},
		{
			"name": "2. Безрецептурное назначение",
			"item": [
				{
					"name": "Предварительные условия",
					"item": [
						{
							"name": "Достать врача и организацию из токена врача и добавить в переменную",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"const jwt = pm.request.auth.oauth2.get(\"accessToken\");\r",
											"console.log(jwt);\r",
											"if (jwt) {\r",
											"    let payload = jwt.split('.')[1];\r",
											"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
											"    while (payload.length % 4) payload += '=';\r",
											"    let decoded = JSON.parse(atob(payload));\r",
											"    console.log(decoded)\r",
											"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
											"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
											"    if (practitionerId) pm.environment.set(\"PractitionerId\", practitionerId);\r",
											"    if (organizationId) pm.environment.set(\"OrganizationId\", organizationId);\r",
											"} else {\r",
											"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "0.3.4934",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "https://postman-echo.com/get",
									"protocol": "https",
									"host": [
										"postman-echo",
										"com"
									],
									"path": [
										"get"
									]
								}
							},
							"response": []
						},
						{
							"name": "Достать PractitionerRole врача (PractitionerRole)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
											"\r",
											"pm.environment.set(\"PractitionerRole\", practitionerRole);\r",
											"console.log(practitionerRole)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId}}",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"PractitionerRole"
									],
									"query": [
										{
											"key": "practitioner",
											"value": "{{PractitionerId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Достать структурное подразделение врача (LocationId)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"let json = pm.response.json();\r",
											"let locationValue = null;\r",
											"\r",
											"if (Array.isArray(json.entry)) {\r",
											"    for (let entry of json.entry) {\r",
											"        if (\r",
											"            entry.resource &&\r",
											"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
											"            Array.isArray(entry.resource.location) &&\r",
											"            entry.resource.location.length > 0\r",
											"        ) {\r",
											"            // Берём reference первого location и извлекаем только UUID\r",
											"            let ref = entry.resource.location[0].reference;\r",
											"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
											"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
											"            }\r",
											"            break;\r",
											"        }\r",
											"    }\r",
											"}\r",
											"\r",
											"if (locationValue) {\r",
											"    pm.environment.set(\"LocationId\", locationValue);\r",
											"    console.log(\"location сохранён:\", locationValue);\r",
											"} else {\r",
											"    console.log(\"location не найден\");\r",
											"}\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole}}",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"PractitionerRole"
									],
									"query": [
										{
											"key": "_id",
											"value": "{{PractitionerRole}}"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "1. Безрецептурные назначения лекарственных средств, созданных в амбулаторных условиях",
					"item": [
						{
							"name": "Поиск пациента по идентификатору (patientId)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
											"\r",
											"pm.environment.set(\"patientId\", patientId);\r",
											"console.log(patientId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551269A009PB0",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient"
									],
									"query": [
										{
											"key": "identifier",
											"value": "7551269A009PB0"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Поиск лекарственного средства Каптоприл",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=каптоприл",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "каптоприл"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Поиск лекарственного средства Аугментин",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=Аугментин ",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "Аугментин "
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Поиск лекарственного средства Метилпреднизолон (по МНН)",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=4204",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "ingredient",
											"value": "4204",
											"description": "Метилпреднизолон"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleEpisodeID1\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"{{$isoTimestamp}}\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionBundleEpisode1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionBundleEpisode1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-03\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisEp1\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosis2Ep1\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Observation/ArterialEp1\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp1Kaptopr\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp1Augm\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp1Metil\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551269A009PB0\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1255212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisEp1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisEp1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Сlinical-functional\",\r\n                                    \"display\": \"Клинико-функциональный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-03\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"J20\",\r\n                            \"display\": \"J20 - Острый бронхит\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"J20 - Острый бронхит\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-03\",\r\n                \"recordedDate\": \"2025-12-03\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Острый бронхит\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosis2Ep1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosis2Ep1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Сlinical-functional\",\r\n                                    \"display\": \"Клинико-функциональный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-03\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"G70.2\",\r\n                            \"display\": \"G70.2 - Врожденная или приобретенная миастения\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"G70.2 - Врожденная или приобретенная миастения\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-03\",\r\n                \"recordedDate\": \"2025-12-03\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Врожденная или приобретенная миастения\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/ArterialEp1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"ArterialEp1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/VitalSignsBy\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ObservationCategoryCode\",\r\n                                \"code\": \"vital-signs\",\r\n                                \"userSelected\": false\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VitalSignsCodes\",\r\n                            \"code\": \"arterial-blood-pressure\",\r\n                            \"display\": \"Артериальное давление\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/ExampleEncounterEp1\"\r\n                },\r\n                \"effectiveDateTime\": \"2025-12-03\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"component\": [\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VitalSignsCodes\",\r\n                                    \"code\": \"systolic-arterial-blood-pressure\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 180,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VitalSignsCodes\",\r\n                                    \"code\": \"diastolic-arterial-blood-pressure\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueQuantity\": {\r\n                            \"value\": 100,\r\n                            \"unit\": \"mm[Hg]\",\r\n                            \"system\": \"https://fhir.by/ValueSet/UnitsOfMeasureBy\",\r\n                            \"code\": \"mm[Hg]\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/ExampleEncounterEp1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"ExampleEncounterEp1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfVisit\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfVisit\",\r\n                                    \"code\": \"primary\",\r\n                                    \"display\": \"первичное обращение\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1234/6\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\",\r\n                            \"display\": \"Плановая медицинская помощь\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"primary\",\r\n                                \"display\": \"Первичная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-12-03T11:30:00Z\",\r\n                    \"end\": \"2025-12-03T11:50:00Z\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisEp1\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\",\r\n                                        \"display\": \"Основной диагноз\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosis2Ep1\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"additionalDiagnosis\",\r\n                                        \"display\": \"Сопутствующий диагноз\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"location\": {\r\n                            \"reference\": \"Location/{{LocationId}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp1Kaptopr\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp1Kaptopr\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"completed\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"short-term\",\r\n                                \"display\": \"Оказание неотложной медицинской помощи\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/24b28503-48a9-464e-bd7e-e4f21f29ca4f\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/ExampleEncounterEp1\"\r\n                },\r\n                \"authoredOn\": \"2025-12-03T11:40:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Observation/ArterialEp1\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Оказание неотложной медицинской помощи во время приема\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-03\",\r\n                    \"end\": \"2025-12-03\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"Одну таблетку под язык, рассосать.\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"count\": 1,\r\n                                \"frequency\": 1,\r\n                                \"period\": 5,\r\n                                \"periodUnit\": \"min\"\r\n                            },\r\n                            \"code\": {\r\n                                \"text\": \"Рассосать\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"070\",\r\n                                    \"display\": \"гастроэнтеральный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 25,\r\n                                    \"unit\": \"мг\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"mg\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp1Augm\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp1Augm\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"active\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"course\",\r\n                                \"display\": \"Короткий курс медикаментозной терапии\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/83ec78f6-6b30-41c1-9356-7100d8d6d902\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"authoredOn\": \"2025-12-03T00:00:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/ExampleEncounterEp1\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisEp1\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Лечение острой респираторной инфекции\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-03\",\r\n                    \"end\": \"2025-12-12\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"По одной таблетке три раза в день во время еды\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"duration\": 10,\r\n                                \"durationMax\": 14,\r\n                                \"durationUnit\": \"d\",\r\n                                \"frequency\": 2,\r\n                                \"frequencyMax\": 3,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\",\r\n                                \"dayOfWeek\": [\r\n                                    \"mon\",\r\n                                    \"tue\",\r\n                                    \"wed\",\r\n                                    \"thu\",\r\n                                    \"fri\",\r\n                                    \"sat\",\r\n                                    \"sun\"\r\n                                ],\r\n                                \"timeOfDay\": [\r\n                                    \"07:00:00\",\r\n                                    \"15:00:00\",\r\n                                    \"23:00:00\"\r\n                                ]\r\n                            },\r\n                            \"code\": {\r\n                                \"text\": \"Принимать во время приема пищи, проглатывать целиком и запивать стаканом воды\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"070\",\r\n                                    \"display\": \"гастроэнтеральный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 1,\r\n                                    \"unit\": \"таблетка\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"tablet\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp1Metil\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp1Metil\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"active\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"course\",\r\n                                \"display\": \"Короткий курс медикаментозной терапии\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/25f4488a-85b5-47b1-a7c1-5a72bbf49a2f\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/ExampleEncounterEp1\"\r\n                },\r\n                \"authoredOn\": \"2025-12-03T11:40:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosis2Ep1\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Постепенное наращивание дозы препарата на 4 мг через каждые 5 приемов\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-03\",\r\n                    \"end\": \"2025-12-22\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"По 16 мг через день\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"count\": 5,\r\n                                \"frequency\": 1,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\",\r\n                                \"timeOfDay\": [\r\n                                    \"09:00:00\"\r\n                                ]\r\n                            },\r\n                            \"code\": {\r\n                                \"text\": \"Принимать лекарственное средство через день, перед едой в первой половине дня\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"070\",\r\n                                    \"display\": \"гастроэнтеральный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 1,\r\n                                    \"unit\": \"таблетка\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"tablet\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"patientInstruction\": \"По 20 мг через день\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"count\": 5,\r\n                                \"frequency\": 1,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\",\r\n                                \"timeOfDay\": [\r\n                                    \"09:00:00\"\r\n                                ]\r\n                            },\r\n                            \"code\": {\r\n                                \"text\": \"Принимать лекарственное средство через день, перед едой в первой половине дня\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"070\",\r\n                                    \"display\": \"гастроэнтеральный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 1,\r\n                                    \"unit\": \"таблетка\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"tablet\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия Назначения лекарственного средства",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationOrder&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"MedicationRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationOrder"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Получение сводной информации о пациенте",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-10&end=2025-12",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"$everything"
									],
									"query": [
										{
											"key": "start",
											"value": "2025-10"
										},
										{
											"key": "end",
											"value": "2025-12"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "2. Отмена назначения ЛС и создании нового безрецептурного назначения в амбулаторных условиях",
					"item": [
						{
							"name": "Поиск пациента по идентификатору (patientId)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
											"\r",
											"pm.environment.set(\"patientId\", patientId);\r",
											"console.log(patientId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551269A009PB0",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient"
									],
									"query": [
										{
											"key": "identifier",
											"value": "7551269A009PB0"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия Назначения ЛС (MedicationRequestAugm)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let medicationRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"MedicationRequest\").resource.id;\r",
											"\r",
											"pm.environment.set(\"MedicationRequestAugm\", medicationRequestId);\r",
											"console.log(medicationRequestId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationOrder&patient={{patientId}}&medication=83ec78f6-6b30-41c1-9356-7100d8d6d902&_sort=-_lastUpdated",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"MedicationRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationOrder"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "medication",
											"value": "83ec78f6-6b30-41c1-9356-7100d8d6d902",
											"description": "Аугментин"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Поиск лекарственного средства Цефтриаксон",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=Цефтриаксон",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "Цефтриаксон"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод поиска Предварительного диагноза (ConditionJ20)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let conditionId = jsonData.entry.find(obj => obj.resource.resourceType === \"Condition\").resource.id;\r",
											"\r",
											"pm.environment.set(\"ConditionJ20\", conditionId);\r",
											"console.log(conditionId)"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Condition?_profile=https://fhir.by/StructureDefinition/FinalDiagnosis&patient={{patientId}}&_sort=-_lastUpdated&code=J20",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"Condition"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/FinalDiagnosis"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										},
										{
											"key": "code",
											"value": "J20"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод поиска Предварительного диагноза (ConditionG70.2)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let conditionId = jsonData.entry.find(obj => obj.resource.resourceType === \"Condition\").resource.id;\r",
											"\r",
											"pm.environment.set(\"ConditionG70.2\", conditionId);\r",
											"console.log(conditionId)"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Condition?_profile=https://fhir.by/StructureDefinition/FinalDiagnosis&patient={{patientId}}&_sort=-_lastUpdated&code=G70.2",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"Condition"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/FinalDiagnosis"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										},
										{
											"key": "code",
											"value": "G70.2"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleEpisodeID2\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"{{$isoTimestamp}}\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionBundleEpisode2\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionBundleEpisode2\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-04\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Contract/ContractAugm\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp2Cetr\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551269A009PB0\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1255212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/ExampleEncounterEp2\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"ExampleEncounterEp2\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1235/6\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"primary\",\r\n                                \"display\": \"Первичная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-12-04T11:30:00Z\",\r\n                    \"end\": \"2025-12-04T11:50:00Z\"\r\n                },\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/{{ConditionJ20}}\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\",\r\n                                        \"display\": \"Основной диагноз\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/{{ConditionG70.2}}\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"additionalDiagnosis\",\r\n                                        \"display\": \"Сопутствующий диагноз\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"location\": {\r\n                            \"reference\": \"Location/{{LocationId}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Contract/ContractAugm\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Contract\",\r\n                \"id\": \"ContractAugm\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CancelOrder\"\r\n                    ]\r\n                },\r\n                \"expirationType\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ReasonOfDrugCancelling\",\r\n                            \"code\": \"correction\",\r\n                            \"display\": \"Коррекция медикаментозной терапии\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"authority\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"Отмена назначения лекарственного средства\",\r\n                \"author\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"topicReference\": {\r\n                    \"reference\": \"MedicationRequest/{{MedicationRequestAugm}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp2Cetr\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp2Cetr\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"active\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"course\",\r\n                                \"display\": \"Короткий курс медикаментозной терапии\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/fc09f2c3-9e13-4747-8687-f9bd05da17b2\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/ExampleEncounterEp2\"\r\n                },\r\n                \"authoredOn\": \"2025-12-04T11:40:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/{{ConditionJ20}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Лечение острой респираторной инфекции\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-04\",\r\n                    \"end\": \"2025-12-13\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"По 1000 мг внутримышечно 2 раза в сутки в течение 10 дней\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"duration\": 10,\r\n                                \"durationUnit\": \"d\",\r\n                                \"frequency\": 2,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"030\",\r\n                                    \"display\": \"внутримышечный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 1000,\r\n                                    \"unit\": \"мг\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"mg\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия Назначения лекарственного средства",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationOrder&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"MedicationRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationOrder"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Получение сводной информации о пациенте",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-10&end=2025-12",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"$everything"
									],
									"query": [
										{
											"key": "start",
											"value": "2025-10"
										},
										{
											"key": "end",
											"value": "2025-12"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "3. Безрецептурные назначения ЛС, созданных в условиях стационара",
					"item": [
						{
							"name": "3.1 Пациент госпитализирован в стационар",
							"item": [
								{
									"name": "Предварительные условия - авторизация врача приемного отделения",
									"item": [
										{
											"name": "Получить новый токен и достать врача приемного отделения из токена (PractitionerId_EmergencyRoom)",
											"event": [
												{
													"listen": "test",
													"script": {
														"exec": [
															"const jwt = pm.request.auth?.oauth2?.get(\"accessToken\") || pm.request.auth?.bearer?.get(\"token\") || null;\r",
															"console.log(jwt);\r",
															"if (jwt) {\r",
															"    let payload = jwt.split('.')[1];\r",
															"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
															"    while (payload.length % 4) payload += '=';\r",
															"    let decoded = JSON.parse(atob(payload));\r",
															"    console.log(decoded)\r",
															"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
															"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
															"    if (practitionerId) pm.environment.set(\"PractitionerId_EmergencyRoom\", practitionerId);\r",
															"    if (organizationId) pm.environment.set(\"OrganizationId\", organizationId);\r",
															"} else {\r",
															"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
															"}"
														],
														"type": "text/javascript",
														"packages": {},
														"requests": {}
													}
												}
											],
											"protocolProfileBehavior": {
												"disableBodyPruning": true
											},
											"request": {
												"method": "GET",
												"header": [
													{
														"key": "X-Fhir-By-Version",
														"value": "0.3.4934",
														"type": "text"
													}
												],
												"body": {
													"mode": "raw",
													"raw": ""
												},
												"url": {
													"raw": "https://postman-echo.com/get",
													"protocol": "https",
													"host": [
														"postman-echo",
														"com"
													],
													"path": [
														"get"
													]
												}
											},
											"response": []
										},
										{
											"name": "Достать PractitionerRole врача приемного отделения (PractitionerRole_EmergencyRoom)",
											"event": [
												{
													"listen": "test",
													"script": {
														"exec": [
															"var jsonData = pm.response.json();\r",
															"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
															"\r",
															"pm.environment.set(\"PractitionerRole_EmergencyRoom\", practitionerRole);\r",
															"console.log(practitionerRole)\r",
															""
														],
														"type": "text/javascript",
														"packages": {},
														"requests": {}
													}
												}
											],
											"request": {
												"method": "GET",
												"header": [],
												"url": {
													"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId_EmergencyRoom}}",
													"protocol": "https",
													"host": [
														"pp",
														"cisz",
														"by"
													],
													"path": [
														"api",
														"fhir",
														"PractitionerRole"
													],
													"query": [
														{
															"key": "practitioner",
															"value": "{{PractitionerId_EmergencyRoom}}"
														}
													]
												}
											},
											"response": []
										},
										{
											"name": "Достать структурное подразделение врача (LocationId_EmergencyRoom)",
											"event": [
												{
													"listen": "test",
													"script": {
														"exec": [
															"let json = pm.response.json();\r",
															"let locationValue = null;\r",
															"\r",
															"if (Array.isArray(json.entry)) {\r",
															"    for (let entry of json.entry) {\r",
															"        if (\r",
															"            entry.resource &&\r",
															"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
															"            Array.isArray(entry.resource.location) &&\r",
															"            entry.resource.location.length > 0\r",
															"        ) {\r",
															"            // Берём reference первого location и извлекаем только UUID\r",
															"            let ref = entry.resource.location[0].reference;\r",
															"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
															"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
															"            }\r",
															"            break;\r",
															"        }\r",
															"    }\r",
															"}\r",
															"\r",
															"if (locationValue) {\r",
															"    pm.environment.set(\"LocationId_EmergencyRoom\", locationValue);\r",
															"    console.log(\"location сохранён:\", locationValue);\r",
															"} else {\r",
															"    console.log(\"location не найден\");\r",
															"}\r",
															""
														],
														"type": "text/javascript",
														"packages": {},
														"requests": {}
													}
												}
											],
											"request": {
												"method": "GET",
												"header": [],
												"url": {
													"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole_EmergencyRoom}}",
													"protocol": "https",
													"host": [
														"pp",
														"cisz",
														"by"
													],
													"path": [
														"api",
														"fhir",
														"PractitionerRole"
													],
													"query": [
														{
															"key": "_id",
															"value": "{{PractitionerRole_EmergencyRoom}}"
														}
													]
												}
											},
											"response": []
										}
									]
								},
								{
									"name": "Поиск пациента по идентификатору (patientId)",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"var jsonData = pm.response.json();\r",
													"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
													"\r",
													"pm.environment.set(\"patientId\", patientId);\r",
													"console.log(patientId)\r",
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551269A009PB0",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient"
											],
											"query": [
												{
													"key": "identifier",
													"value": "7551269A009PB0"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод импорта пакета медицинской информации",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
													"    pm.response.to.have.status(202);\r",
													"});\r",
													"\r",
													"var jsonData = pm.response.json();\r",
													"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
													"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
													"\r",
													"console.log(statusReference.valueReference.reference);\r",
													"\r",
													"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
													"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										},
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "POST",
										"header": [
											{
												"key": "X-Fhir-By-Version",
												"value": "active",
												"type": "text"
											}
										],
										"body": {
											"mode": "raw",
											"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleEpisodeID3.1\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-06T16:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionBundleEpisode3.1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionBundleEpisode3.1\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-06T16:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId_EmergencyRoom}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle по госпитализации\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/PreliminaryConditionEp3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"EpisodeOfCare/ExampleHospitalisationEp3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551269A009PB0\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1255212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"EpisodeOfCare/ExampleHospitalisationEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"EpisodeOfCare\",\r\n                \"id\": \"ExampleHospitalisationEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/Hospitalisation\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaidType\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HospitalisationPaidType\",\r\n                                            \"code\": \"govern\",\r\n                                            \"display\": \"за счет бюджетных средств\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaid\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EmergencyHospitalisationTerm\",\r\n                        \"valuePositiveInt\": 48\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HepatitisBool\",\r\n                        \"valueBoolean\": false\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DiagnosisOfSendingOrganisation\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Condition/PreliminaryConditionEp3\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SequenceNumbeHospitalisation\",\r\n                        \"valuePositiveInt\": 1\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1249/1\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\",\r\n                                \"display\": \"Специализированная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/HospitalisationReasonUse\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"Экстренная госпитализация\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": [\r\n                            {\r\n                                \"concept\": {\r\n                                    \"text\": \"Тяжелое течение заболевания\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/PreliminaryConditionEp3\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\",\r\n                                    \"display\": \"Предварительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"managingOrganization\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"period\": {\r\n                    \"start\": \"2025-12-06\"\r\n                },\r\n                \"careManager\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole_EmergencyRoom}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/PreliminaryConditionEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"PreliminaryConditionEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-06T10:12:00Z\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"J15\",\r\n                            \"display\": \"J15 - Бактериальная пневмония, не классифицированная в других рубриках\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-06\",\r\n                \"recordedDate\": \"2025-12-06\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole_EmergencyRoom}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Предварительный диагноз Бактериальная пневмония?\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
											"options": {
												"raw": {
													"language": "json"
												}
											}
										},
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Bundle",
												"$import"
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод получения статуса импорта пакета медицинской информации",
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Bundle",
												"{{bundleId}}",
												"$status"
											]
										}
									},
									"response": []
								}
							]
						},
						{
							"name": "3.2 Безрецептурные назначения ЛС в условиях стационара",
							"item": [
								{
									"name": "Предварительные условия - авторизация врача-терапевта",
									"item": [
										{
											"name": "Получить новый токен и достать врача-терапевта (PractitionerId_therapist)",
											"event": [
												{
													"listen": "test",
													"script": {
														"exec": [
															"const jwt = pm.request.auth?.oauth2?.get(\"accessToken\") || pm.request.auth?.bearer?.get(\"token\") || null;\r",
															"console.log(jwt);\r",
															"if (jwt) {\r",
															"    let payload = jwt.split('.')[1];\r",
															"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
															"    while (payload.length % 4) payload += '=';\r",
															"    let decoded = JSON.parse(atob(payload));\r",
															"    console.log(decoded)\r",
															"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
															"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
															"    if (practitionerId) pm.environment.set(\"PractitionerId_therapist\", practitionerId);\r",
															"    if (organizationId) pm.environment.set(\"OrganizationId\", organizationId);\r",
															"} else {\r",
															"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
															"}"
														],
														"type": "text/javascript",
														"packages": {},
														"requests": {}
													}
												}
											],
											"protocolProfileBehavior": {
												"disableBodyPruning": true
											},
											"request": {
												"method": "GET",
												"header": [
													{
														"key": "X-Fhir-By-Version",
														"value": "0.3.4934",
														"type": "text"
													}
												],
												"body": {
													"mode": "raw",
													"raw": ""
												},
												"url": {
													"raw": "https://postman-echo.com/get",
													"protocol": "https",
													"host": [
														"postman-echo",
														"com"
													],
													"path": [
														"get"
													]
												}
											},
											"response": []
										},
										{
											"name": "Достать PractitionerRole врача-терапевта (PractitionerRole_therapist)",
											"event": [
												{
													"listen": "test",
													"script": {
														"exec": [
															"var jsonData = pm.response.json();\r",
															"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
															"\r",
															"pm.environment.set(\"PractitionerRole_therapist\", practitionerRole);\r",
															"console.log(practitionerRole)\r",
															""
														],
														"type": "text/javascript",
														"packages": {},
														"requests": {}
													}
												}
											],
											"request": {
												"method": "GET",
												"header": [],
												"url": {
													"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId_therapist}}&position-type=therapist",
													"protocol": "https",
													"host": [
														"pp",
														"cisz",
														"by"
													],
													"path": [
														"api",
														"fhir",
														"PractitionerRole"
													],
													"query": [
														{
															"key": "practitioner",
															"value": "{{PractitionerId_therapist}}"
														},
														{
															"key": "position-type",
															"value": "therapist"
														}
													]
												}
											},
											"response": []
										},
										{
											"name": "Достать структурное подразделение врача (LocationId_therapist)",
											"event": [
												{
													"listen": "test",
													"script": {
														"exec": [
															"let json = pm.response.json();\r",
															"let locationValue = null;\r",
															"\r",
															"if (Array.isArray(json.entry)) {\r",
															"    for (let entry of json.entry) {\r",
															"        if (\r",
															"            entry.resource &&\r",
															"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
															"            Array.isArray(entry.resource.location) &&\r",
															"            entry.resource.location.length > 0\r",
															"        ) {\r",
															"            // Берём reference первого location и извлекаем только UUID\r",
															"            let ref = entry.resource.location[0].reference;\r",
															"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
															"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
															"            }\r",
															"            break;\r",
															"        }\r",
															"    }\r",
															"}\r",
															"\r",
															"if (locationValue) {\r",
															"    pm.environment.set(\"LocationId_therapist\", locationValue);\r",
															"    console.log(\"location сохранён:\", locationValue);\r",
															"} else {\r",
															"    console.log(\"location не найден\");\r",
															"}\r",
															""
														],
														"type": "text/javascript",
														"packages": {},
														"requests": {}
													}
												}
											],
											"request": {
												"method": "GET",
												"header": [],
												"url": {
													"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole_therapist}}",
													"protocol": "https",
													"host": [
														"pp",
														"cisz",
														"by"
													],
													"path": [
														"api",
														"fhir",
														"PractitionerRole"
													],
													"query": [
														{
															"key": "_id",
															"value": "{{PractitionerRole_therapist}}"
														}
													]
												}
											},
											"response": []
										}
									]
								},
								{
									"name": "Поиск пациента по идентификатору (patientId)",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"var jsonData = pm.response.json();\r",
													"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
													"\r",
													"pm.environment.set(\"patientId\", patientId);\r",
													"console.log(patientId)\r",
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551269A009PB0",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient"
											],
											"query": [
												{
													"key": "identifier",
													"value": "7551269A009PB0"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод проверки наличия Назначения ЛС (MedicationRequestCetr)",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"var jsonData = pm.response.json();\r",
													"let medicationRequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"MedicationRequest\").resource.id;\r",
													"\r",
													"pm.environment.set(\"MedicationRequestCetr\", medicationRequestId);\r",
													"console.log(medicationRequestId)\r",
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationOrder&patient={{patientId}}&medication=fc09f2c3-9e13-4747-8687-f9bd05da17b2&_sort=-_lastUpdated",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient",
												"{{patientId}}",
												"MedicationRequest"
											],
											"query": [
												{
													"key": "_profile",
													"value": "https://fhir.by/StructureDefinition/MedicationOrder"
												},
												{
													"key": "patient",
													"value": "{{patientId}}"
												},
												{
													"key": "medication",
													"value": "fc09f2c3-9e13-4747-8687-f9bd05da17b2",
													"description": "Цефтриаксон"
												},
												{
													"key": "_sort",
													"value": "-_lastUpdated"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод поиска активного случая Госпитализации (startEpisodeOfCareId)",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"var jsonData = pm.response.json();\r",
													"let episodeOfCaretId = jsonData.entry.find(obj => obj.resource.resourceType === \"EpisodeOfCare\").resource.id;\r",
													"\r",
													"pm.environment.set(\"startEpisodeOfCareId\", episodeOfCaretId);\r",
													"console.log(episodeOfCaretId)"
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/EpisodeOfCare?_profile=https://fhir.by/StructureDefinition/Hospitalisation&patient={{patientId}}&_sort=-_lastUpdated&status=active",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient",
												"{{patientId}}",
												"EpisodeOfCare"
											],
											"query": [
												{
													"key": "_profile",
													"value": "https://fhir.by/StructureDefinition/Hospitalisation"
												},
												{
													"key": "patient",
													"value": "{{patientId}}"
												},
												{
													"key": "_sort",
													"value": "-_lastUpdated"
												},
												{
													"key": "status",
													"value": "active"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод поиска Предварительного диагноза (preliminaryCondition)",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"var jsonData = pm.response.json();\r",
													"let conditionId = jsonData.entry.find(obj => obj.resource.resourceType === \"Condition\").resource.id;\r",
													"\r",
													"pm.environment.set(\"preliminaryCondition\", conditionId);\r",
													"console.log(conditionId)"
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Condition?_profile=https://fhir.by/StructureDefinition/FinalDiagnosis&patient={{patientId}}&_sort=-_lastUpdated",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient",
												"{{patientId}}",
												"Condition"
											],
											"query": [
												{
													"key": "_profile",
													"value": "https://fhir.by/StructureDefinition/FinalDiagnosis"
												},
												{
													"key": "patient",
													"value": "{{patientId}}"
												},
												{
													"key": "_sort",
													"value": "-_lastUpdated"
												},
												{
													"key": "code",
													"value": "J15",
													"disabled": true
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Поиск лекарственного средства Азитромицин (по МНН)",
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=136&doseForm=109000000",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Medication"
											],
											"query": [
												{
													"key": "_profile",
													"value": "https://fhir.by/StructureDefinition/DrugComponent"
												},
												{
													"key": "ingredient",
													"value": "136",
													"description": "Азитромицин"
												},
												{
													"key": "doseForm",
													"value": "109000000",
													"description": "капсулы"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Поиск лекарственного средства Ацетилцистеин (по МНН)",
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=733&doseForm=порошок для приготовления раствора для внутреннего применения",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Medication"
											],
											"query": [
												{
													"key": "_profile",
													"value": "https://fhir.by/StructureDefinition/DrugComponent"
												},
												{
													"key": "ingredient",
													"value": "733",
													"description": "Ацетилцистеин"
												},
												{
													"key": "doseForm",
													"value": "порошок для приготовления раствора для внутреннего применения"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод импорта пакета медицинской информации",
									"event": [
										{
											"listen": "test",
											"script": {
												"exec": [
													"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
													"    pm.response.to.have.status(202);\r",
													"});\r",
													"\r",
													"var jsonData = pm.response.json();\r",
													"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
													"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
													"\r",
													"console.log(statusReference.valueReference.reference);\r",
													"\r",
													"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
													"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										},
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript",
												"packages": {},
												"requests": {}
											}
										}
									],
									"request": {
										"method": "POST",
										"header": [
											{
												"key": "X-Fhir-By-Version",
												"value": "active",
												"type": "text"
											}
										],
										"body": {
											"mode": "raw",
											"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleEpisodeID3.2\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-15T16:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionBundleEpisode3.2\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionBundleEpisode3.2\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-15T16:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId_therapist}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle по госпитализации\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ClinicalConditionEp3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/FinalConditionEp3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"EpisodeOfCare/ExampleHospitalisationEp3.2\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Contract/ContractCetr\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp3.2\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551269A009PB0\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1255212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"EpisodeOfCare/ExampleHospitalisationEp3.2\",\r\n            \"resource\": {\r\n                \"resourceType\": \"EpisodeOfCare\",\r\n                \"id\": \"ExampleHospitalisation2.3Test\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/Hospitalisation\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TreatmentOutcome\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/TreatmentOutcome\",\r\n                                            \"code\": \"3\",\r\n                                            \"display\": \"Выписка из стационара\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/LocationUnitOfOrganization\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"Location/{{LocationId_therapist}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TreatmentPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-12-06\",\r\n                                    \"end\": \"2025-12-15\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TreatingPractitioner\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HeadOfUnit\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/BedProfiles\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/BedProfile\",\r\n                                            \"code\": \"short-therapeutic\",\r\n                                            \"display\": \"терапевтические\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TreatmentInUnit\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaidType\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HospitalisationPaidType\",\r\n                                            \"code\": \"govern\",\r\n                                            \"display\": \"за счет бюджетных средств\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaid\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EmergencyHospitalisationTerm\",\r\n                        \"valuePositiveInt\": 48\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DiagnosisOfSendingOrganisation\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Condition/{{preliminaryCondition}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SequenceNumbeHospitalisation\",\r\n                        \"valuePositiveInt\": 1\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PreviusResourceHospitalisation\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"EpisodeOfCare/{{startEpisodeOfCareId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1249/2\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"waitlist\",\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\",\r\n                                \"display\": \"Специализированная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/HospitalisationReasonUse\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"Экстренная госпитализация\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": [\r\n                            {\r\n                                \"concept\": {\r\n                                    \"text\": \"Тяжелое течение заболевания\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/{{preliminaryCondition}}\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\",\r\n                                    \"display\": \"Предварительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ClinicalConditionEp3\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Clinical\",\r\n                                    \"display\": \"Клинический диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/FinalConditionEp3\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\",\r\n                                    \"display\": \"Заключительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"managingOrganization\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"period\": {\r\n                    \"start\": \"2025-11-15\",\r\n                    \"end\": \"2025-11-20\"\r\n                },\r\n                \"careManager\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole_EmergencyRoom}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ClinicalConditionEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ClinicalConditionEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Сlinical-functional\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-06T10:12:00Z\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"J15\",\r\n                            \"display\": \"J15 - Бактериальная пневмония, не классифицированная в других рубриках\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-06\",\r\n                \"recordedDate\": \"2025-12-06\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/FinalConditionEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"FinalConditionEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-15T10:12:00Z\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"J15.2\",\r\n                            \"display\": \"J15.2 - Пневмония, вызванная стафилококком\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Внебольничная долевая пневмония нижней доли правого лёгкого. Тяжёлое течение.\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-15\",\r\n                \"recordedDate\": \"2025-12-15\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Contract/ContractCetr\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Contract\",\r\n                \"id\": \"ContractCetr\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CancelOrder\"\r\n                    ]\r\n                },\r\n                \"expirationType\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ReasonOfDrugCancelling\",\r\n                            \"code\": \"correction\",\r\n                            \"display\": \"Коррекция медикаментозной терапии\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"authority\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"Отмена назначения лекарственного средства\",\r\n                \"author\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                },\r\n                \"topicReference\": {\r\n                    \"reference\": \"MedicationRequest/{{MedicationRequestCetr}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"completed\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"inpatient\",\r\n                                \"display\": \"Лечение, проведенное в условиях стационара\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/eebb3ac2-e4c3-46db-9cd1-bbde92ab31cb\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"authoredOn\": \"2025-12-06T11:40:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ClinicalConditionEp3\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Лечение острой респираторной инфекции\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-06\",\r\n                    \"end\": \"2025-12-15\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"По 4 капсулы 1 раз в сутки за 1 час до еды, запивая водой\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"duration\": 10,\r\n                                \"durationUnit\": \"d\",\r\n                                \"frequency\": 1,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\",\r\n                                \"dayOfWeek\": [\r\n                                    \"mon\",\r\n                                    \"tue\",\r\n                                    \"wed\",\r\n                                    \"thu\",\r\n                                    \"fri\",\r\n                                    \"sat\",\r\n                                    \"sun\"\r\n                                ],\r\n                                \"timeOfDay\": [\r\n                                    \"07:00:00\"\r\n                                ]\r\n                            },\r\n                            \"code\": {\r\n                                \"text\": \"Принимать за 1 час до еды, запивая водой\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"070\",\r\n                                    \"display\": \"гастроэнтеральный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 1000,\r\n                                    \"unit\": \"мг\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"mg\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp3.2\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp3.2\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"active\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"course\",\r\n                                \"display\": \"Короткий курс медикаментозной терапии\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/f67c0dd9-b73b-4469-870d-9241d255ee1a\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"authoredOn\": \"2025-12-15T11:40:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole_therapist}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/FinalConditionEp3\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Лечение острой респираторной инфекции\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-15\",\r\n                    \"end\": \"2025-12-19\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"По одному пакету 2 - 3 раза в день\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"duration\": 5,\r\n                                \"durationMax\": 7,\r\n                                \"durationUnit\": \"d\",\r\n                                \"frequency\": 2,\r\n                                \"frequencyMax\": 3,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\",\r\n                                \"dayOfWeek\": [\r\n                                    \"mon\",\r\n                                    \"tue\",\r\n                                    \"wed\",\r\n                                    \"thu\",\r\n                                    \"fri\",\r\n                                    \"sat\",\r\n                                    \"sun\"\r\n                                ],\r\n                                \"timeOfDay\": [\r\n                                    \"07:00:00\",\r\n                                    \"15:00:00\",\r\n                                    \"23:00:00\"\r\n                                ]\r\n                            },\r\n                            \"code\": {\r\n                                \"text\": \"Содержимое 1 пакета растворяют в 1/2 стакана (примерно 100 мл) теплой питьевой воды непосредственно перед приемом.\"\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"070\",\r\n                                    \"display\": \"гастроэнтеральный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 200,\r\n                                    \"unit\": \"мг\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"mg\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
											"options": {
												"raw": {
													"language": "json"
												}
											}
										},
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Bundle",
												"$import"
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод получения статуса импорта пакета медицинской информации",
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Bundle",
												"{{bundleId}}",
												"$status"
											]
										}
									},
									"response": []
								},
								{
									"name": "Метод проверки наличия Назначения лекарственного средства",
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationOrder&patient={{patientId}}&_sort=-_lastUpdated",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient",
												"{{patientId}}",
												"MedicationRequest"
											],
											"query": [
												{
													"key": "_profile",
													"value": "https://fhir.by/StructureDefinition/MedicationOrder"
												},
												{
													"key": "patient",
													"value": "{{patientId}}"
												},
												{
													"key": "_sort",
													"value": "-_lastUpdated"
												}
											]
										}
									},
									"response": []
								},
								{
									"name": "Получение сводной информации о пациенте",
									"request": {
										"method": "GET",
										"header": [],
										"url": {
											"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-10&end=2025-12",
											"protocol": "https",
											"host": [
												"pp",
												"cisz",
												"by"
											],
											"path": [
												"api",
												"fhir",
												"Patient",
												"{{patientId}}",
												"$everything"
											],
											"query": [
												{
													"key": "start",
													"value": "2025-10"
												},
												{
													"key": "end",
													"value": "2025-12"
												}
											]
										}
									},
									"response": []
								}
							]
						}
					]
				},
				{
					"name": "4.  Безрецептурные назначения ЛС, созданных в условиях отделения дневного пребывания",
					"item": [
						{
							"name": "Поиск пациента по идентификатору (patientId)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
											"\r",
											"pm.environment.set(\"patientId\", patientId);\r",
											"console.log(patientId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551269A009PB0",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient"
									],
									"query": [
										{
											"key": "identifier",
											"value": "7551269A009PB0"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Поиск лекарственного средства ДЕКСКЕТОПРОФЕН",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=ДЕКСКЕТОПРОФЕН-БЕЛМЕД",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "ДЕКСКЕТОПРОФЕН-БЕЛМЕД"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод импорта пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleEpisodeID4\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"{{$isoTimestamp}}\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionBundleEpisode4\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionBundleEpisode4\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-05\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisEp4\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"EpisodeOfCare/ExampleDayCare4Test\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp4\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551269A009PB0\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1255212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisEp4\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisEp4\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Сlinical-functional\",\r\n                                    \"display\": \"Клинико-функциональный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-05\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"M16.0\",\r\n                            \"display\": \"M16.0 – Первичный коксартроз двусторонний\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Первичный коксартроз двусторонний. Стадия 3\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-05\",\r\n                \"recordedDate\": \"2025-12-05\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Первичный коксартроз двусторонний\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"EpisodeOfCare/ExampleDayCare4Test\",\r\n            \"resource\": {\r\n                \"resourceType\": \"EpisodeOfCare\",\r\n                \"id\": \"ExampleDayCare4Test\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DayCare\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaidType\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HospitalisationPaidType\",\r\n                                            \"code\": \"self\",\r\n                                            \"display\": \"за счет собственных средств\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaid\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/DayCareMedicationOrder\",\r\n                                \"valueReference\": {\r\n                                    \"reference\": \"MedicationRequest/ExampleMedicationOrderEp4\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DayCareMedications\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1221/125\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"finished\",\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\",\r\n                                \"display\": \"Специализированная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"value\": [\r\n                            {\r\n                                \"concept\": {\r\n                                    \"text\": \"Выраженный болевой синдром\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisEp4\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"managingOrganization\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"period\": {\r\n                    \"start\": \"2025-12-05\",\r\n                    \"end\": \"2025-12-09\"\r\n                },\r\n                \"careManager\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"MedicationRequest/ExampleMedicationOrderEp4\",\r\n            \"resource\": {\r\n                \"resourceType\": \"MedicationRequest\",\r\n                \"id\": \"ExampleMedicationOrderEp4\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedicationOrder\"\r\n                    ]\r\n                },\r\n                \"status\": \"active\",\r\n                \"intent\": \"order\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CourseOfTherapyType\",\r\n                                \"code\": \"course\",\r\n                                \"display\": \"Короткий курс медикаментозной терапии\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"medication\": {\r\n                    \"reference\": {\r\n                        \"reference\": \"Medication/6be2f3b3-7d8a-4217-beb9-4d30cdf8a152\"\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"informationSource\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"authoredOn\": \"2025-12-05T11:40:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisEp4\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Лечение болевого синдрома\"\r\n                    }\r\n                ],\r\n                \"effectiveDosePeriod\": {\r\n                    \"start\": \"2025-12-05\",\r\n                    \"end\": \"2025-12-09\"\r\n                },\r\n                \"dosageInstruction\": [\r\n                    {\r\n                        \"patientInstruction\": \"По 50 мг внутривенно 1 раз в сутки в течение 5 дней\",\r\n                        \"timing\": {\r\n                            \"repeat\": {\r\n                                \"duration\": 5,\r\n                                \"durationUnit\": \"d\",\r\n                                \"frequency\": 1,\r\n                                \"period\": 1,\r\n                                \"periodUnit\": \"d\",\r\n                                \"timeOfDay\": [\r\n                                    \"09:00:00\"\r\n                                ]\r\n                            }\r\n                        },\r\n                        \"route\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationRouteAdmin\",\r\n                                    \"code\": \"042\",\r\n                                    \"display\": \"внутривенный\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"doseAndRate\": [\r\n                            {\r\n                                \"doseQuantity\": {\r\n                                    \"value\": 50,\r\n                                    \"unit\": \"мг\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByUnits\",\r\n                                    \"code\": \"mg\"\r\n                                },\r\n                                \"rateQuantity\":{\r\n                                    \"value\": 25,\r\n                                    \"unit\": \"мг/ч\",\r\n                                    \"system\": \"https://fhir.by/ValueSet/MedicationByRateUnits\",\r\n                                    \"code\": \"mg/h\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод получения статуса импорта пакета медицинской информации",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "Метод проверки наличия Назначения лекарственного средства",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/MedicationRequest?_profile=https://fhir.by/StructureDefinition/MedicationOrder&patient={{patientId}}&_sort=-_lastUpdated",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"MedicationRequest"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationOrder"
										},
										{
											"key": "patient",
											"value": "{{patientId}}"
										},
										{
											"key": "_sort",
											"value": "-_lastUpdated"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Получение сводной информации о пациенте",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-09&end=2025-11",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Patient",
										"{{patientId}}",
										"$everything"
									],
									"query": [
										{
											"key": "start",
											"value": "2025-09"
										},
										{
											"key": "end",
											"value": "2025-11"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		},
		{
			"name": "Отмена импорта медицинской информации",
			"item": [
				{
					"name": "Отмена импорта медицинской информации",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$cancel",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$cancel"
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Примеры поиска лекарственных средств по торговому наименованию и по МНН",
			"item": [
				{
					"name": "1. Поиск лекарственного средства по МНН",
					"item": [
						{
							"name": "1.1 Поиск компонента лекарственного средства по его логическому идентификатору",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&_id=7209bc8b-e8e9-4a78-9089-91ab737d93ee",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "_id",
											"value": "7209bc8b-e8e9-4a78-9089-91ab737d93ee"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.2 Поиск компонента лекарственного средства в конкретной лекарственной форме по коду действующего вещества",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=Acetylsalicylic acid&doseForm=129000096,129000000",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "ingredient",
											"value": "Acetylsalicylic acid",
											"description": "\"Ацетилсалициловая кислота\""
										},
										{
											"key": "doseForm",
											"value": "129000096,129000000",
											"description": "\"таблетки шипучие\",\"таблетки\""
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.3 Поиск компонента лекарственного средства, регистрация которого не аннулирована, по коду действующего вещества (введено несколько кодов)",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=Acetylsalicylic acid,3097&status=active",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "ingredient",
											"value": "Acetylsalicylic acid,3097",
											"description": "\"Ацетилсалициловая кислота\",\"каптоприл\""
										},
										{
											"key": "status",
											"value": "active"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.4 Поиск компонента лекарственного средства, которое отпускается без рецепта",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=Acetylsalicylic acid&drugDispensingRules=without-prescription",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "ingredient",
											"value": "Acetylsalicylic acid",
											"description": "\"Ацетилсалициловая кислота\""
										},
										{
											"key": "drugDispensingRules",
											"value": "without-prescription",
											"description": "\"без рецепта\""
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.5 Поиск компонента лекарственного средства по коду АТХ",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&ingredient=Acetylsalicylic acid&code=B01AC06,N02BA51",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "ingredient",
											"value": "Acetylsalicylic acid",
											"description": "\"Ацетилсалициловая кислота\""
										},
										{
											"key": "code",
											"value": "B01AC06,N02BA51",
											"description": "\"Ацетилсалициловая кислота\",\"Ацетилсалициловая кислота в комбинации со средствами (исключая психотропные препараты)\""
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.6 Поиск компонента лекарственного средства по его виду",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&typeOfMedicine=vitamins,medicine",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "typeOfMedicine",
											"value": "vitamins,medicine",
											"description": "\"витамины\",\"лекарственное средство\""
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.7 Поиск наркотических компонентов лекарственных средств, регистрация которых не аннулирована",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&psychotropicOrNarcotic=narcotic&status=active",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "psychotropicOrNarcotic",
											"value": "narcotic",
											"description": "\"наркотическое средство\""
										},
										{
											"key": "status",
											"value": "active"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "1.8 Поиск компонентов лекарственных средства, относящихся к списку хранения А",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/DrugComponent&storageListA=true",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/DrugComponent"
										},
										{
											"key": "storageListA",
											"value": "true",
											"description": "\"включен в список хранения А \""
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "2. Поиск лекарственного средства по торговому наименованию",
					"item": [
						{
							"name": "2.1 Поиск по торговому наименованию (полное совпадение строки) лекарственного средства, регистрация которого не аннулирована",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=ацетилсалициловая кислота&status=active",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "ацетилсалициловая кислота"
										},
										{
											"key": "status",
											"value": "active"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "2.2 Поиск по торговому наименованию (частичное совпадение строки) лекарственного средства, регистрация которого не аннулирована",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=ацетил&status=active",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "ацетил"
										},
										{
											"key": "status",
											"value": "active"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "2.3 Поиск по торговому наименованию (совпадение по нескольким частям названия) лекарственного средства, регистрация которого не аннулирована",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&name=салициловая&name=кислота&status=active",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "name",
											"value": "салициловая"
										},
										{
											"key": "name",
											"value": "кислота"
										},
										{
											"key": "status",
											"value": "active"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "2.4 Поиск по логическому идентификатору компонента оригинального лекарственного средства",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://pp.cisz.by/api/fhir/Medication?_profile=https://fhir.by/StructureDefinition/MedicationBy&component=7209bc8b-e8e9-4a78-9089-91ab737d93ee",
									"protocol": "https",
									"host": [
										"pp",
										"cisz",
										"by"
									],
									"path": [
										"api",
										"fhir",
										"Medication"
									],
									"query": [
										{
											"key": "_profile",
											"value": "https://fhir.by/StructureDefinition/MedicationBy"
										},
										{
											"key": "component",
											"value": "7209bc8b-e8e9-4a78-9089-91ab737d93ee"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		}
	],
	"auth": {
		"type": "oauth2",
		"oauth2": [
			{
				"key": "useBrowser",
				"value": true,
				"type": "boolean"
			},
			{
				"key": "redirect_uri",
				"value": "https://oauth.pstmn.io/v1/callback",
				"type": "string"
			},
			{
				"key": "clientId",
				"value": "mis_agsr_web_application",
				"type": "string"
			},
			{
				"key": "tokenRequestParams",
				"value": [
					{
						"key": "origin",
						"value": "https://oauth.pstmn.io/v1/callback",
						"enabled": true,
						"send_as": "request_header"
					}
				],
				"type": "any"
			},
			{
				"key": "scope",
				"value": "profile email acr realm roles",
				"type": "string"
			},
			{
				"key": "accessTokenUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/token",
				"type": "string"
			},
			{
				"key": "authUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/auth",
				"type": "string"
			},
			{
				"key": "clientSecret",
				"value": "",
				"type": "string"
			},
			{
				"key": "grant_type",
				"value": "authorization_code_with_pkce",
				"type": "string"
			},
			{
				"key": "refreshRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "authRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "challengeAlgorithm",
				"value": "S256",
				"type": "string"
			},
			{
				"key": "addTokenTo",
				"value": "header",
				"type": "string"
			},
			{
				"key": "client_authentication",
				"value": "body",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "practitioner_id",
			"value": ""
		},
		{
			"key": "organization_id",
			"value": ""
		},
		{
			"key": "locationId",
			"value": ""
		},
		{
			"key": "patientId",
			"value": ""
		},
		{
			"key": "bundleId",
			"value": ""
		},
		{
			"key": "StatusUrl",
			"value": ""
		}
	]
}